import Layout from "@/views/layout/Layout";

const adminRouter = [
  /// 产品及分类
  {
    path: "/service",
    component: Layout,
    redirect: "/service",
    meta: { title: "产品及分类", icon: "el-icon-setting" },
    children: [
      {
        path: "cate",
        component: () => import("@/views/service/cate_index"),
        name: "cate",
        meta: { title: "分类管理", icon: "el-icon-setting" }
      },
      {
        path: "goods",
        component: () => import("@/views/service/service_index"),
        name: "goods",
        meta: { title: "产品管理", icon: "el-icon-setting" }
      },
      {
        path: "/service/goods/add",
        component: () => import("@/views/service/service_add"),
        name: "goods_add",
        meta: { title: "产品添加", icon: "el-icon-setting" },
        hidden:true,
      },
      {
        path: "/service/goods/edit",
        component: () => import("@/views/service/service_edit"),
        name: "goods_edit",
        meta: { title: "产品管理", icon: "el-icon-setting" },
        hidden:true,
      }
    ]
  },

  /// 订单管理
  {
    path: "/ordermanager",
    component: Layout,
    redirect: "ordermanager",
    children: [
      {
        path: "ordermanager",
        component: () => import("@/views/order_manager/index"),
        name: "ordermanager",
        meta: { title: "订单管理", icon: "el-icon-suitcase" }
      }
    ]
  },
  /// 财务管理
  {
    path: "/financialmanager",
    component: Layout,
    redirect: "financialmanager",
    children: [
      {
        path: "financialmanager",
        component: () => import("@/views/financial_manager/index"),
        name: "financialmanager",
        meta: { title: "财务管理", icon: "el-icon-suitcase" }
      }
    ]
  },
  /// 用户列表
  {
    path: "/master_list",
    component: Layout,
    redirect: "master_list",
    children: [
      {
        path: "master_list",
        component: () => import("@/views/master_list/index"),
        name: "master_list",
        meta: { title: "用户师傅列表", icon: "el-icon-s-operation" },
      }
    ]
  },
  /// 设置
  {
    path: "/setting",
    component: Layout,
    name: "setting",
    children: [
      {
        path: "setting",
        component: () => import("@/views/setting/index"),
        name: "setting",
        meta: { title: "设置", icon: "el-icon-setting" }
      }
    ]
  }
];

export default adminRouter;
